summaryrefslogtreecommitdiff
path: root/src/pages/micro/[...slug].astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/micro/[...slug].astro')
-rw-r--r--src/pages/micro/[...slug].astro34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/pages/micro/[...slug].astro b/src/pages/micro/[...slug].astro
deleted file mode 100644
index 681c106..0000000
--- a/src/pages/micro/[...slug].astro
+++ /dev/null
@@ -1,34 +0,0 @@
----
-import { getCollection } from "astro:content";
-import type { GetStaticPaths, InferGetStaticPropsType } from "astro";
-import Note from "@/components/note/Note.astro";
-import PageLayout from "@/layouts/Base.astro";
-import { siteConfig } from "@/site.config";
-
-// if you're using an adaptor in SSR mode, getStaticPaths wont work -> https://docs.astro.build/en/guides/routing/#modifying-the-slug-example-for-ssr
-export const getStaticPaths = (async () => {
- // Get only Pleroma posts
- const allMicro = await getCollection("micro").catch(() => []); // Fallback to empty array if micro collection fails
-
- return allMicro.map((post) => ({
- params: { slug: post.id },
- props: { note: post }, // Keep 'note' name for compatibility with existing component
- }));
-}) satisfies GetStaticPaths;
-
-export type Props = InferGetStaticPropsType<typeof getStaticPaths>;
-
-const { note } = Astro.props;
-
-const meta = {
- description:
- note.data.description ||
- `Read about my note posted on: ${note.data.publishDate.toLocaleDateString()}`,
- title: note.data.title,
- lang: note.data.language || siteConfig.lang,
-};
----
-
-<PageLayout meta={meta}>
- <Note as="h1" note={note} />
-</PageLayout>